3.7 \(\int \frac{\csc ^3(x)}{i+\tan (x)} \, dx\)

Optimal. Leaf size=24 \[ -\csc (x)-\frac{1}{2} i \tanh ^{-1}(\cos (x))+\frac{1}{2} i \cot (x) \csc (x) \]

[Out]

(-I/2)*ArcTanh[Cos[x]] - Csc[x] + (I/2)*Cot[x]*Csc[x]

________________________________________________________________________________________

Rubi [A]  time = 0.13226, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3518, 3108, 3107, 2606, 8, 2611, 3770} \[ -\csc (x)-\frac{1}{2} i \tanh ^{-1}(\cos (x))+\frac{1}{2} i \cot (x) \csc (x) \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^3/(I + Tan[x]),x]

[Out]

(-I/2)*ArcTanh[Cos[x]] - Csc[x] + (I/2)*Cot[x]*Csc[x]

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rule 3108

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3107

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{\csc ^3(x)}{i+\tan (x)} \, dx &=\int \frac{\cot (x) \csc ^2(x)}{i \cos (x)+\sin (x)} \, dx\\ &=-\left (i \int \cot (x) \csc ^2(x) (\cos (x)+i \sin (x)) \, dx\right )\\ &=-\left (i \int \left (i \cot (x) \csc (x)+\cot ^2(x) \csc (x)\right ) \, dx\right )\\ &=-\left (i \int \cot ^2(x) \csc (x) \, dx\right )+\int \cot (x) \csc (x) \, dx\\ &=\frac{1}{2} i \cot (x) \csc (x)+\frac{1}{2} i \int \csc (x) \, dx-\operatorname{Subst}(\int 1 \, dx,x,\csc (x))\\ &=-\frac{1}{2} i \tanh ^{-1}(\cos (x))-\csc (x)+\frac{1}{2} i \cot (x) \csc (x)\\ \end{align*}

Mathematica [B]  time = 0.021679, size = 75, normalized size = 3.12 \[ -\frac{1}{2} \tan \left (\frac{x}{2}\right )-\frac{1}{2} \cot \left (\frac{x}{2}\right )+\frac{1}{8} i \csc ^2\left (\frac{x}{2}\right )-\frac{1}{8} i \sec ^2\left (\frac{x}{2}\right )+\frac{1}{2} i \log \left (\sin \left (\frac{x}{2}\right )\right )-\frac{1}{2} i \log \left (\cos \left (\frac{x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^3/(I + Tan[x]),x]

[Out]

-Cot[x/2]/2 + (I/8)*Csc[x/2]^2 - (I/2)*Log[Cos[x/2]] + (I/2)*Log[Sin[x/2]] - (I/8)*Sec[x/2]^2 - Tan[x/2]/2

________________________________________________________________________________________

Maple [B]  time = 0.039, size = 42, normalized size = 1.8 \begin{align*} -{\frac{1}{2}\tan \left ({\frac{x}{2}} \right ) }-{\frac{i}{8}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+{{\frac{i}{8}} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-2}}-{\frac{1}{2} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}}+{\frac{i}{2}}\ln \left ( \tan \left ({\frac{x}{2}} \right ) \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^3/(I+tan(x)),x)

[Out]

-1/2*tan(1/2*x)-1/8*I*tan(1/2*x)^2+1/8*I/tan(1/2*x)^2-1/2/tan(1/2*x)+1/2*I*ln(tan(1/2*x))

________________________________________________________________________________________

Maxima [B]  time = 1.24577, size = 80, normalized size = 3.33 \begin{align*} -\frac{{\left (\frac{4 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - i\right )}{\left (\cos \left (x\right ) + 1\right )}^{2}}{8 \, \sin \left (x\right )^{2}} - \frac{\sin \left (x\right )}{2 \,{\left (\cos \left (x\right ) + 1\right )}} - \frac{i \, \sin \left (x\right )^{2}}{8 \,{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{1}{2} i \, \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(I+tan(x)),x, algorithm="maxima")

[Out]

-1/8*(4*sin(x)/(cos(x) + 1) - I)*(cos(x) + 1)^2/sin(x)^2 - 1/2*sin(x)/(cos(x) + 1) - 1/8*I*sin(x)^2/(cos(x) +
1)^2 + 1/2*I*log(sin(x)/(cos(x) + 1))

________________________________________________________________________________________

Fricas [B]  time = 2.13258, size = 232, normalized size = 9.67 \begin{align*} \frac{{\left (-i \, e^{\left (4 i \, x\right )} + 2 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) +{\left (i \, e^{\left (4 i \, x\right )} - 2 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) - 6 i \, e^{\left (3 i \, x\right )} + 2 i \, e^{\left (i \, x\right )}}{2 \,{\left (e^{\left (4 i \, x\right )} - 2 \, e^{\left (2 i \, x\right )} + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(I+tan(x)),x, algorithm="fricas")

[Out]

1/2*((-I*e^(4*I*x) + 2*I*e^(2*I*x) - I)*log(e^(I*x) + 1) + (I*e^(4*I*x) - 2*I*e^(2*I*x) + I)*log(e^(I*x) - 1)
- 6*I*e^(3*I*x) + 2*I*e^(I*x))/(e^(4*I*x) - 2*e^(2*I*x) + 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\csc ^{3}{\left (x \right )}}{\tan{\left (x \right )} + i}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**3/(I+tan(x)),x)

[Out]

Integral(csc(x)**3/(tan(x) + I), x)

________________________________________________________________________________________

Giac [B]  time = 1.3854, size = 63, normalized size = 2.62 \begin{align*} -\frac{1}{8} i \, \tan \left (\frac{1}{2} \, x\right )^{2} - \frac{6 i \, \tan \left (\frac{1}{2} \, x\right )^{2} + 4 \, \tan \left (\frac{1}{2} \, x\right ) - i}{8 \, \tan \left (\frac{1}{2} \, x\right )^{2}} + \frac{1}{2} i \, \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) \right |}\right ) - \frac{1}{2} \, \tan \left (\frac{1}{2} \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^3/(I+tan(x)),x, algorithm="giac")

[Out]

-1/8*I*tan(1/2*x)^2 - 1/8*(6*I*tan(1/2*x)^2 + 4*tan(1/2*x) - I)/tan(1/2*x)^2 + 1/2*I*log(abs(tan(1/2*x))) - 1/
2*tan(1/2*x)